package edu.luc.cs.trull;

/**
 * A building block for building complex components from existing components.
 */
public interface Combinator extends Component {
	
	/**
	 * This method adds a component to this combinator.
	 */ 
	void addComponent(Component comp);
	
	/**
	 * This method adds a child component to this combinator 
	 * using the given constraints to determine the role of the component.
	 */
	void addComponent(Component comp, Object constraints);
	
	/**
	 * This method retrieves a child component from this combinator.
	 */ 
	Component getComponent(int i);
	
	/**
	 * This method retrieves all child components from this combinator as an array.
	 */ 
	Component[] getComponents();
	
	/**
	 * This method returns the number of child components currently in this
	 * combinator. 
	 */
	int getComponentCount();

	/**
	 * This method removes the specified child component from this combinator.
	 */
	void removeComponent(Component comp);
	
	/**
	 * This method removes all components from this combinator.
	 */
	void removeAllComponents();
}
